const mock = {
  "POST /api/flow-platform/app/list": (req, res) => {
    setTimeout(() => {
      if (req.query.type === "error") {
        res.status(200).json({
          errCode: "-1",
          errMsg: "连接数据库错误啦",
          datas: "",
        });
      } else {
        res.status(200).json({
          errCode: 0,
          totalCount: 30,
          datas: {
            app: [
              {
                id: 1,
                name: '应用名称	',
                business: [
                  {
                    id: 2,
                    name: '业务名称1',
                  },
                  {
                    id: 3,
                    name: '业务名称2',
                  },
                ],
              },
            ],
          },
        });
      }
    }, 2000);
  },
  /* 水务4a mock
  'POST /flow-platform/4A/getRootOrg': (req, res) => {
    setTimeout(() => {
      res.status(200).json({"success":true,"errCode":0,"errMsg":"success","totalCount":0,"datas":[{"code":"31553a94bd4011ebb5cd00163e207636","displayName":"测试组织2"},{"code":"3155376abd4011ebb5cd00163e207636","displayName":"测试组织1"},{"code":"31553080bd4011ebb5cd00163e207636","displayName":"上海城投水务集团"}],"pageNum":1,"pageSize":10});
    });
  },
  'POST /flow-platform/4A/getOrgsByParentCode': (req, res) => {
    setTimeout(() => {
      res.status(200).json({"success":true,"errCode":0,"errMsg":"success","totalCount":0,"datas":[],"pageNum":1,"pageSize":10});
    });
  },
  'POST /flow-platform/4A/getUserByOrgCode': (req, res) => {
    setTimeout(() => {
      res.status(200).json({"success":true,"errCode":0,"errMsg":"success","totalCount":0,"datas":[],"pageNum":1,"pageSize":10});
    });
  },
  'POST /flow-platform/4A/getOrgsByParentCode': (req, res) => {
    setTimeout(() => {
      res.status(200).json({"success":true,"errCode":0,"errMsg":"success","totalCount":0,"datas":[{"code":"5634379cbd93449ca9fcc666b8c0ef8f","displayName":"ccccccc"},{"code":"63b12768b0034e2c84afd112ae8093f6","displayName":"组织888"},{"code":"4602e05fc912413cafda50d73418a92e","displayName":"组织123"},{"code":"5bddf1e5282f4c80b892ea4daf795851","displayName":"测是组织"},{"code":"a7e1d35c1d914cbb817a08fe98b64e6d","displayName":"测试组织"},{"code":"77e0cfe1d6f44961af77d1a9c8c136dc","displayName":"测试组织child"},{"code":"31553b00bd4011ebb5cd00163e207636","displayName":"测试组织3"}],"pageNum":1,"pageSize":10});
    });
  },
  'POST /flow-platform/4A/getUserByOrgCode': (req, res) => {
    setTimeout(() => {
      res.status(200).json({"success":true,"errCode":0,"errMsg":"success","totalCount":0,"datas":[{"code":"2","username":"张三","displayName":"张三"},{"code":"3","username":"张三1","displayName":"张三1"},{"code":"5","username":"张三3","displayName":"张三3"},{"code":"8","username":"萨达","displayName":"萨达"},{"code":"12","username":"萨达","displayName":"萨达"},{"code":"32","username":"张三31","displayName":"张三31"},{"code":"34","username":"张三33","displayName":"张三33"},{"code":"17801130139","username":"杨过","displayName":"杨过"},{"code":"17801130141","username":"张无忌1","displayName":"张无忌1"},{"code":"17801130142","username":"老白","displayName":"老白"},{"code":"17801130150","username":"陈清都","displayName":"陈清都"}],"pageNum":1,"pageSize":10});
    });
  },
  */
};
module.exports = mock;
